function MainPager(config){
	this.url = config.url;
	this.pager = config.pager;
	this.rowList = config.rowList;
	this.rowNum = config.rowNum;
	this.colNames = config.colNames;
	this.colModel = config.colModel;
	this.sortname = config.sortname;
	this.sortorder = config.sortorder;
	
	this.page = 1;
	this.roleId = null;
	
	this.load = function(){
		$.get(this.url, {
			"ac": "load", 
			"page": this.page,
			"rows": this.rowNum
			
		
		}, function(data){
			
		});
	};
	
	this.deleteWasConfirmed = function(){
		$("#dialog-delete").dialog('close');
		$.get(this.url, {"ac": "delete", "role_id": this.roleId}, function(data){
			this.load();	
			/*if (data == true) {
				$("#pager_row_" + deleteConfirm.roleId).remove();
			} 
			if (data == false) {
				$("#dialog-error").dialog('open');
			}*/
		});	
	};
	
	this.init = function(){
		$(".pager_actions span").hover(
				function(){$(this).addClass('ui-state-highlight');},
				function(){$(this).removeClass('ui-state-highlight');}
		);
		
		$("#dialog-delete").dialog({
			modal: true,
			buttons: {
				Ok: function() {
					this.deleteWasConfirmed();
				}
			},
			autoOpen: false	
		});
		$("#dialog-delete-error").dialog({
			modal: true,
			autoOpen: false	
		});
	};
	
	this.init();
	
}